<!DOCTYPE html>
<html lang="zh-CN">
    <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>贪吃蛇游戏</title>
    <style>
        body {
        margin: 0;
        padding: 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        font-family: Arial, sans-serif;
        background-color: #f5f5f5;
        }
        
        h1 {
        color: #333;
        margin-bottom: 20px;
        }
        
        #gameCanvas {
        background-color: #f0f0f0;
        border: 2px solid #999;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }
        
        .instructions {
        margin-top: 20px;
        padding: 15px;
        background-color: #fff;
        border-radius: 5px;
        box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
        max-width: 600px;
        }
        
        @media (max-width: 640px) {
        #gameCanvas {
            width: 100%;
            height: auto;
        }
        }
    </style>
    </head>
    <body>
        <h1>贪吃蛇游戏</h1>
        <canvas id="gameCanvas"></canvas>
        
        <div class="instructions">
            <h3>操作说明:</h3>
            <p>使用方向键(↑↓←→)或WASD控制蛇的移动方向</p>
            <p>空格键: 暂停/继续游戏</p>
        </div>
        <script src="game.js"></script>
        <script src="renderer.js"></script>
        <script src="input.js"></script>
        <script src="main.js"></script>
    </body>
</html>